<!-- BEGIN PAGE HEADER-->
<?php $this->load->view('partials/breadcrumb.tpl')?>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<script type="text/javascript">
function defConfirm(url){
	if(!confirm("确定要删除吗？")){
		return false;
	}
	window.location.href = url;
	return true;
}
$(document).ready(function(){
	$("#reset").click(function(){
		$("select").val('');
		$("input[type='text']").val('');
	});
});
</script>
<div class="row">
	<div class="col-md-12">
		<!-- Begin: life time stats -->
		<div class="portlet">
			<?=form_open('', Array('class'=>'form-inline', 'role'=>'form'))?>
				<?=search_form_input('name',filterValue('name'),'游戏名称...', 'class="form-control input-medium"');?>
				<?=search_form_dropdown('tag_id',Array(''=>'游戏标签...')+parse_options($tagList,'id','tag'),filterValue('tag_id'),'', 'class="form-control input-medium"');?>
				<?=search_form_dropdown('type',Array(''=>'游戏类型...')+IOSS_Game::$gameTypes,filterValue('type'),'', 'class="form-control input-medium"');?>
				<?=search_form_dropdown('platform',Array(''=>'游戏平台...')+IOSS_Game::$gamePlatforms,filterValue('platform'),'', 'class="form-control input-medium"');?>
				<?=search_form_dropdown('status',Array(''=>'选择状态...', '1'=>'正常', '0'=>'禁用'),filterValue('status'),'状态', 'class="form-control input-medium"');?>
				<button type="button" class="btn default" id="reset">重置条件</button>
				<button type="submit" class="btn green about_search">搜索 <i class="fa fa-search"></i></button>
			<?=form_close()?>
			<div class="portlet-body">
				<div class="row">
					<div class="col-md-12">
						<div class="table-scrollable">
							<table class="table table-hover table-bordered table-striped">
								<thead>
								<tr>
									<th width="15%">名称</th>				
									<th width="15%">标识</th>
									<th width="15%">类型</th>
									<th width="15%">平台</th>
									<th width="15%">排序</th>
									<th width="15%">状态</th>
									<th width="10%">操作</th>
								</tr>
								</thead>
								<tbody>
								<?php  foreach ($list as $node){	?>
									<tr>
										<td>
										<?php if($p->edit){?><a href="<?=site_url($thisModule.$thisController.'/edit/'.$node->id)?>"><?php }?>
										<span><?=htmlspecialchars($node->name)?></span>
										<?php if($p->edit){?></a><?php }?>
										</td>
										<td><?=htmlspecialchars($node->code)?></td>
										<td><?=htmlspecialchars(IOSS_Game::getGameType($node->type))?></td>
										<td><?=htmlspecialchars(IOSS_Game::getGamePlatform($node->platform))?></td>
										<td><?=$node->sort?></td>
										<td><?=($node->status == 0 ? '<span class="label label-danger status_icons label_status_icons">禁用</span>' : '<span class="label label-success status_icons label_status_icons">启用</span>')?></td>
										<td>
										<?php if($p->delete){?>
										<a class="black" href="javascript:void(defConfirm('<?=site_url($thisModule.$thisController.'/delete/'.$node->id.'/'.$node->update_time) ?>'));"><i class="fa fa-trash-o"></i> <?=l('delete')?></a>
										<?php }?>
										</td>
									</tr>
								<?php }?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12 text-right">
						<?=$pagination?>
					</div>
				</div>
			</div>
		</div>
		<!-- End: life time stats -->
	</div>
</div>

<!-- END PAGE CONTENT-->
